package com.fishery.authority.mapper;

import com.fishery.authority.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.swagger.annotations.ApiParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 711
 * @since 2021-01-13
 */
public interface RoleMapper extends BaseMapper<Role> {

    void deleteALLById(String roleId);

    List<Role> findOthersByUserId(String userId);

    List<Role> findByUserId(String userId);

    String findRoleNameByUserId(String userId);

    //查询同一基地下是否有相同的角色名
    List<Role> selectSameRoleName(@Param("baseId") String baseId, @Param("roleName") String roleName);

    //手写修改角色信息sql
    void handwriteupdate(@Param("name") String name, @Param("remarks") String remarks);
}
